package com.duanjw.java.annotation.util;


import com.duanjw.java.annotation.annotation.Entity;

/**
 * 工具类
 *
 * @author duanjw
 */
public class CommonUtil {
    public static String buildSql(Object object) {
        // 类对象
        Class<?> clazz = object.getClass();

        // 1. 判断是否加Entity注解
        if (clazz.isAnnotationPresent(Entity.class)) {
            // 2. 得到注解
            Entity annotation = clazz.getAnnotation(Entity.class);
            // 3. 调用方法
            String value = annotation.value();
        }
        String simpleName = clazz.getSimpleName();
        System.out.println(simpleName);
        return null;
    }
}
